CUSTOM Windows API 1.14
Loading...
Searching...
No Matches
ccw_DeviceImpl.h
Go to the documentation of this file.
1// File Revision
2// Rev 1.07
3//
4// Rev. notes:
5// - rel 1.00: first release
6//
7// - rel 1.01: Fixed the signature for GETVARIABLE_FN and SETVARIABLE_FN
8//
9// - rel 1.02: Add OPENCASHDRAWER_FN signature
10// Add PRINTTEXTUTF8_FN signature
11// Add PRINTTEXTUTF8EX_FN signature
12// Add EJECTWITHTIMEOUT_FN signature
13//
14// - rel 1.03: Add SETGRAPHICSTOPMARGIN_FN signature
15// Add GETGRAPHICSTOPMARGIN_FN signature
16//
17// - rel 1.04: Add GETCAPCODEPAGESLIST_FN signature
18// Add TRANSACTIONPRINT_FN signature
19//
20// - rel 1.05: Add SETOPNEDEVICEMODE_FN signature
21// Add GETOPNEDEVICEMODE_FN signature
22//
23// - rel 1.06: Add GETCOUNTER_FN signature
24// Add RESETDEVICE_FN signature
25// Add DELETEPRINTERINTERNALQUEUE_FN signature
26// Fixed SETOPENDEVICEMODE_FN and GETOPENDEVICEMODE_FN signatures
27//
28// - rel 1.07: Add GETINSTALLEDPRINTERFULLSTATUS_FN signature
29
30
31// NOTE: Please DO NOT EDIT THIS FILE
32
37
38#ifndef _CCW_DEVICEIMPL_H__
39#define _CCW_DEVICEIMPL_H__
40
41#include "ccw_Status.h"
42
43// Hide in documentation
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50 typedef CcwResult(WINAPI * INITLIBRARY_FN) (CcwLogVerbosity logVerbosityLevel, wchar_t* pstrLogFolder);
51 typedef CcwResult(WINAPI * DEINITLIBRARY_FN) ();
52 typedef CcwResult(WINAPI * CLOSEDEVICE_FN) (DWORD dwPrinterDevID);
53 typedef CcwResult(WINAPI * CLOSEALLDEVICES_FN) ();
54
55 typedef CcwResult(WINAPI * GETAPIVERSION_FN) (wchar_t* pAPIVersion);
56
57 typedef CcwResult(WINAPI * GETINFOPRINTERID_FN) (DWORD dwPrinterDevID, WORD* pwPrinterID);
58 typedef CcwResult(WINAPI * GETINFOFIRMWAREVERSION_FN) (DWORD dwPrinterDevID, wchar_t* pFirmwareVersion);
59 typedef CcwResult(WINAPI * GETINFODEVICEMODEL_FN) (DWORD dwPrinterDevID, wchar_t* pDeviceModel);
60
61 typedef CcwResult(WINAPI * GETCAPCOMMPORTTYPE_FN) (DWORD dwPrinterDevID, CommunicationPortType* pcomPortType);
62 typedef CcwResult(WINAPI * GETCAPPRINTAVAILABLE_FN) (DWORD dwPrinterDevID, BOOL* pbPrnAvailable);
63 typedef CcwResult(WINAPI * GETCAPPRINTERRESOLUTION_FN) (DWORD dwPrinterDevID, DWORD* pdwPrinterResolution);
64 typedef CcwResult(WINAPI * GETCAPPRINTWIDTH_FN) (DWORD dwPrinterDevID, DWORD* pdwPageWidth);
65 typedef CcwResult(WINAPI * SETCAPPRINTWIDTH_FN) (DWORD dwPrinterDevID, DWORD dwNewPageWith);
66 typedef CcwResult(WINAPI * GETCAPCODEPAGESLIST_FN) (DWORD dwPrinterDevID, wchar_t* pCodePagesList, DWORD* pdwStringBufferSize);
67
68 typedef CcwResult(WINAPI * COMMGETREADTIMEOUT_FN) (DWORD dwPrinterDevID, DWORD* pdwRTimeout);
69 typedef CcwResult(WINAPI * COMMSETREADTIMEOUT_FN) (DWORD dwPrinterDevID, DWORD dwRTimeout);
70 typedef CcwResult(WINAPI * COMMGETWRITETIMEOUT_FN) (DWORD dwPrinterDevID, DWORD* pdwWTimeout);
71 typedef CcwResult(WINAPI * COMMSETWRITETIMEOUT_FN) (DWORD dwPrinterDevID, DWORD dwWTimeout);
72 typedef CcwResult(WINAPI * COMMCLEARREADBUFFER_FN) (DWORD dwPrinterDevID);
73 typedef CcwResult(WINAPI * COMMCLEARWRITEBUFFER_FN) (DWORD dwPrinterDevID);
74 typedef CcwResult(WINAPI * COMMREAD_FN) (DWORD dwPrinterDevID, BYTE* bDataRead, DWORD dwDataToReadSize, DWORD* pdwReadDataSize);
75 typedef CcwResult(WINAPI * COMMWRITE_FN) (DWORD dwPrinterDevID, BYTE* bDataToWrite, DWORD dwDataToWriteSize, DWORD* pdwWrittenData);
76
77 typedef CcwResult(WINAPI * TRANSACTIONPRINT_FN) (DWORD dwPrinterDevID, TrPrintMode tpMode);
78
79 typedef CcwResult(WINAPI * FEED_FN) (DWORD dwPrinterDevID, DWORD dwnFeeds);
80 typedef CcwResult(WINAPI * CUT_FN) (DWORD dwPrinterDevID, CutType cuttype);
81 typedef CcwResult(WINAPI * EJECT_FN) (DWORD dwPrinterDevID, EjectType ejtype);
82 typedef CcwResult(WINAPI * EJECTWITHTIMEOUT_FN) (DWORD dwPrinterDevID, EjectType ejtype, DWORD dwTimeOutms);
83 typedef CcwResult(WINAPI * PRESENT_FN) (DWORD dwPrinterDevID, DWORD dwpresentMM);
84 typedef CcwResult(WINAPI * ALIGN_FN) (DWORD dwPrinterDevID, PaperAlignType aligntype);
85 typedef CcwResult(WINAPI * OPENCASHDRAWER_FN) (DWORD dwPrinterDevID, CashDrawerType drawerType, DWORD dwTimeOn, DWORD dwTimeOff);
86
87 typedef CcwResult(WINAPI * PRINTERISREADY_FN) (DWORD dwPrinterDevID, BOOL* pbOnLine);
88 typedef CcwResult(WINAPI * GETPRINTERFULLSTATUS_FN) (DWORD dwPrinterDevID, BYTE* pBuffer, PrinterStatusStruct* pStatusStruct);
89
90 typedef CcwResult(WINAPI * GETCOUNTER_FN) (DWORD device, DevCounterType devCounter, DWORD* pdwCounterValue);
91
92 typedef CcwResult(WINAPI * RESETDEVICE_FN) (DWORD device, BOOL bWaitReset);
93 typedef CcwResult(WINAPI * DELETEPRINTERINTERNALQUEUE_FN) (DWORD device);
94
95 typedef CcwResult(WINAPI * PRINTTEXT_FN) (DWORD dwPrinterDevID, wchar_t* pText, BOOL bAddLF);
96 typedef CcwResult(WINAPI * PRINTTEXTEX_FN) (DWORD dwPrinterDevID, wchar_t* pText, PrintFontStruct* pfontStruct, BOOL bAddLF);
97 typedef CcwResult(WINAPI * PRINTTEXTUTF8_FN) (DWORD dwPrinterDevID, char* pText, BOOL bAddLF);
98 typedef CcwResult(WINAPI * PRINTTEXTUTF8EX_FN) (DWORD dwPrinterDevID, char* pText, PrintFontStruct* pfontStruct, BOOL bAddLF);
99
100 typedef CcwResult(WINAPI * SETIGNOREWHITEIMAGES_FN) (DWORD dwPrinterDevID, BOOL bIgnore);
101 typedef CcwResult(WINAPI * SETGRMODETOBLACKWHITE_FN) (DWORD dwPrinterDevID, ImageGRMode imgGrModeType, BYTE bThreshold);
102 typedef CcwResult(WINAPI * SETPAGEMODETOROLL_FN) (DWORD dwPrinterDevID, BOOL bRollMode);
103 typedef CcwResult(WINAPI * PRINTIMAGEFROMPATH_FN) (DWORD dwPrinterDevID, wchar_t* pstrImageFilePath, PrintImageStruct* pImageStruct);
104 typedef CcwResult(WINAPI * PRINTRAWIMAGE_FN) (DWORD device, RAWBitDepth bits, BYTE* pRawBuffer, DWORD dwRawBufferSize, DWORD dwWidth, DWORD dwHeight, PrintImageStruct* pImageStruct);
105 typedef CcwResult(WINAPI * SETGRAPHICSTOPMARGIN_FN) (DWORD dwPrinterDevID, DWORD dwTopMargin);
106 typedef CcwResult(WINAPI * GETGRAPHICSTOPMARGIN_FN) (DWORD dwPrinterDevID, DWORD* pdwTopMargin);
107
108 typedef CcwResult(WINAPI * PRINTBARCODESTRING_FN) (DWORD dwPrinterDevID, wchar_t* strBrcText, PrintBarcodeStruct* pBarcodeStruct);
109 typedef CcwResult(WINAPI * PRINTBARCODEBUFFER_FN) (DWORD dwPrinterDevID, BYTE* bBrcBuffer, DWORD dwSrcBufferSize, PrintBarcodeStruct* pBarcodeStruct);
110
111 typedef CcwResult(WINAPI * GETVARIABLE_FN) (DWORD dwPrinterDevID, wchar_t* var, void* value);
112 typedef CcwResult(WINAPI * SETVARIABLE_FN) (DWORD dwPrinterDevID, wchar_t* var, void* value);
113
114 typedef CcwResult(WINAPI * SETOPENDEVICEMODE_FN) (OpenDeviceMode ode);
115 typedef CcwResult(WINAPI * GETOPENDEVICEMODE_FN) (OpenDeviceMode* pode);
116
117 typedef CcwResult(WINAPI * RAWDATATOPRINTSPOOLER_FN) (wchar_t* pstrPrinterName, BYTE* bDataToWrite, DWORD dwDataToWriteSize, wchar_t* strDocName);
118 typedef CcwResult(WINAPI * BINFILETOPRINTSPOOLER_FN) (wchar_t* pstrPrinterName, wchar_t* pstrFilePath, wchar_t* strDocName);
119 typedef CcwResult(WINAPI * ENUMINSTALLEDPRINTERS_FN) (PrinterStruct* pPrintersArray, LPDWORD pdwNumPrinter);
120 typedef CcwResult(WINAPI * OPENINSTALLEDPRINTER_FN) (wchar_t* pstrPrinterName, DWORD* pdwPrinterDevID);
121
122 typedef CcwResult(WINAPI * ENUMUSBDEVICES_FN) (USBDeviceStruct* pUSBDevicesArray, LPDWORD pdwDeviceNum);
123 typedef CcwResult(WINAPI * OPENPRINTERUSB_FN) (WORD wVID, WORD wPID, wchar_t* pstrSN, DWORD* dwPrinterDevID);
124 typedef CcwResult(WINAPI * OPENPRINTERUSBEX_FN) (USBDeviceStruct* pUsbDev, DWORD* dwPrinterDevID);
125
126 typedef CcwResult(WINAPI * ENUMETHDEVICES_FN) (ETHDeviceStruct* pETHDevicesArray, LPDWORD pdwDeviceNum, DWORD dwSearchTimeout);
127 typedef CcwResult(WINAPI * OPENPRINTERETH_FN) (wchar_t* strPrinterIPAddress, DWORD dwPrinterIPPort, DWORD* dwPrinterDevID);
128 typedef CcwResult(WINAPI * OPENPRINTERETHEX_FN) (ETHDeviceStruct* pEthDev, DWORD* dwPrinterDevID);
129
130 typedef CcwResult(WINAPI * ENUMCOMPORTS_FN) (COMPortStruct* pCOMPortsArray, LPDWORD pdwPortsNum);
131 typedef CcwResult(WINAPI * OPENPRINTERCOM_FN) (wchar_t* strPrinterComPort, DWORD* dwPrinterDevID);
132 typedef CcwResult(WINAPI * OPENPRINTERCOMEX_FN) (COMPortStruct* pComDev, DWORD* dwPrinterDevID);
133
134 typedef CcwResult(WINAPI * GETINSTALLEDPRINTERFULLSTATUS_FN) (wchar_t* pstrPrinterName, BYTE* pBuffer, PrinterStatusStruct* pStatusStruct, OpenDeviceMode* pode);
135
136#ifdef __cplusplus
137}
138#endif
139
141
142#endif
CcwResult
Definition ccw_Error.h:25
Data and parameters definition.
ImageGRMode
Print Image : threshold mode to print the Image.
Definition ccw_Types.h:372
OpenDeviceMode
Open Communication Port Mode.
Definition ccw_Types.h:681
CashDrawerType
Cash Drawer connector pin.
Definition ccw_Types.h:316
CommunicationPortType
Communication port.
Definition ccw_Types.h:137
RAWBitDepth
RAW Bit depth type.
Definition ccw_Types.h:103
CutType
Paper cut type.
Definition ccw_Types.h:265
DevCounterType
Counter types supported by the devices.
Definition ccw_Types.h:703
EjectType
Eject paper type.
Definition ccw_Types.h:282
TrPrintMode
Transaction Print.
Definition ccw_Types.h:654
CcwLogVerbosity
Log verbosity. Set library log verbosity using InitLibrary.
Definition ccw_Types.h:56
PaperAlignType
Paper alignment type.
Definition ccw_Types.h:299
Definition ccw_Types.h:829
Definition ccw_Types.h:804
Definition ccw_Types.h:954
Definition ccw_Types.h:862
Definition ccw_Types.h:924
Definition ccw_Status.h:26
Definition ccw_Types.h:753
Definition ccw_Types.h:774